JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

spork/misc/cond->

spork


    macro
    /usr/local/lib/janet/spork/misc.janet on line 265, column 1

    (cond-> val & clauses)

    Threading conditional macro. It takes `val` to mutate, and 
    `clauses` pairs with condition and operation to which `val`, is 
    passed as first argument. All conditions are tried and for truthy 
    conditions the operation is executed. Returns the value mutated if 
    any condition is truthy.


0 examplesSign in to add an example
Loading...